/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package metodos_estaticos_tema3;

import java.util.Scanner;

/**
 *
 * @author Alex
 */
public class ejer_13 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
    
        
        Scanner teclado = new Scanner (System.in);
        
        String cad ;
       
         int n;  
         
        System.out.println("Dime un numero: ");
        cad=teclado.nextLine(); 
        n=Integer.parseInt(cad);
         
        long fato=1;
        for (int cont = 0; cont <=n; cont++) {
            fato*=cont;
        }
       
        System.out.println("El factorial de "+n+" es "+fato);
    }
}
